package com.sc.basic.service.impl;

import com.sc.basic.entity.Weather;
import com.sc.basic.entity.WeatherResponse;
import com.sc.basic.service.WeatherDataService;
import com.sc.basic.service.WeatherReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author shuchang
 * @Date 2018/3/16 下午5:32
 */
@Service
public class WeatherReportServiceImpl implements WeatherReportService {

    @Autowired
    private WeatherDataService weatherDataService;

    @Override
    public Weather getDataByCityId(String cityId) {
        WeatherResponse res = weatherDataService.getDataByCityId(cityId);
        return res.getData();
    }
}
